package edu.mapi.ir.viewer;

import java.awt.Image;
import java.awt.image.BufferedImage;

import edu.mapi.ir.gui.GuiUtils;

/**
 * @author ZP
 */
public class Theme {

	private static Theme currentTheme = setCurrentTheme("urban");
	
	private BufferedImage groundImage;
	private BufferedImage highWallsImage;
	private BufferedImage lowWallsImage;
	private Image cheeseImage;	
	
	public static String[] THEMES = {"urban", "country"}; 
	
	public static Theme getCurrentTheme() {
		return currentTheme;
	}
	
	private Theme(String dir) {
		this.groundImage = GuiUtils.toBufferedImage(GuiUtils.getImage("themes/"+dir+"/ground.png"));
		this.highWallsImage = GuiUtils.toBufferedImage(GuiUtils.getImage("themes/"+dir+"/high.png"));
		this.lowWallsImage = GuiUtils.toBufferedImage(GuiUtils.getImage("themes/"+dir+"/low.png"));
		this.cheeseImage = GuiUtils.toBufferedImage(GuiUtils.getImage("themes/"+dir+"/cheese.png"));
	}
	
	public static Theme setCurrentTheme(String dir) {
		currentTheme = new Theme(dir);
		return currentTheme;
	}

	public BufferedImage getGroundImage() {
		return groundImage;
	}

	public BufferedImage getHighWallsImage() {
		return highWallsImage;
	}

	public BufferedImage getLowWallsImage() {
		return lowWallsImage;
	}

	public Image getCheeseImage() {
		return cheeseImage;
	}
}
